public class Customer {
    private String name;
    private String contact;
    private String deliveryAddress;
    private boolean active;

    public Customer(String name, String contact, String deliveryAddress, boolean active) {
        this.name = name;
        this.contact = contact;
        this.deliveryAddress = deliveryAddress;
        this.active = active;
    }

    // Getters and setters
    public String getName() { return name; }
    public String getContact() { return contact; }
    public String getDeliveryAddress() { return deliveryAddress; }
    public boolean isActive() { return active; }
}
public enum OrderStatus {
    CREATE,
    PAID,
    SHIPPING,
    DELIVERED,
    CANCEL
}
import java.util.Date;
import java.util.ArrayList;
import java.util.List;

public class Order {
    private Date createDate;
    private OrderStatus status;
    private List<OrderDetail> orderDetails;

    public Order(Date createDate) {
        this.createDate = createDate;
        this.status = OrderStatus.CREATE;
        this.orderDetails = new ArrayList<>();
    }

    public void addOrderDetail(OrderDetail orderDetail) {
        orderDetails.add(orderDetail);
    }

    // Getters and setters
    public Date getCreateDate() { return createDate; }
    public OrderStatus getStatus() { return status; }
    public List<OrderDetail> getOrderDetails() { return orderDetails; }
}
import java.util.Date;
import java.util.ArrayList;
import java.util.List;

public class Order {
    private Date createDate;
    private OrderStatus status;
    private List<OrderDetail> orderDetails;

    public Order(Date createDate) {
        this.createDate = createDate;
        this.status = OrderStatus.CREATE;
        this.orderDetails = new ArrayList<>();
    }

    public void addOrderDetail(OrderDetail orderDetail) {
        orderDetails.add(orderDetail);
    }

    // Getters and setters
    public Date getCreateDate() { return createDate; }
    public OrderStatus getStatus() { return status; }
    public List<OrderDetail> getOrderDetails() { return orderDetails; }
}
public class Product {
    private String title;
    private double weight;
    private String description;
    private double price;

    public Product(String title, double weight, String description, double price) {
        this.title = title;
        this.weight = weight;
        this.description = description;
        this.price = price;
    }

    public double getPriceForQuantity(int quantity) {
        return price * quantity;
    }

    public double getWeight() {
        return weight;
    }

    // Getters
    public String getTitle() { return title; }
    public String getDescription() { return description; }
}
public abstract class Payment {
    protected double amount;

    public Payment(double amount) {
        this.amount = amount;
    }

    // Getters
    public double getAmount() { return amount; }
}
public class Credit extends Payment {
    private String number;
    private String type;
    private Date expireDate;

    public Credit(double amount, String number, String type, Date expireDate) {
        super(amount);
        this.number = number;
        this.type = type;
        this.expireDate = expireDate;
    }
}
public class Cash extends Payment {
    private double cashTendered;

    public Cash(double amount, double cashTendered) {
        super(amount);
        this.cashTendered = cashTendered;
    }
}
public class WireTransfer extends Payment {
    private String bankID;
    private String bankName;

    public WireTransfer(double amount, String bankID, String bankName) {
        super(amount);
        this.bankID = bankID;
        this.bankName = bankName;
    }
}
public class AliPay extends Payment {
    private String number;

    public AliPay(double amount, String number) {
        super(amount);
        this.number = number;
    }
}
public class WeixinPay extends Payment {
    private String number;

    public WeixinPay(double amount, String number) {
        super(amount);
        this.number = number;
    }
}
